<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Layui</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" type="text/css" href="layui/css/layui.css"/>
  <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
 
<table class="layui-hide" id="test"></table>
              
          
<script src="layui/layui.js"></script> 
<script src="js/perapi.js"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 --> 
<script>
	layui.use(['table','jquery'], function(){
		

	  var table = layui.table; 
	  var  $=layui.jquery;
	  // ajk请求
	  
	  $.get("/my/article/list",{pagenum:1,pagesize:1000},function(result){				
						  table.render({
						    elem: '#test',
							data:result.data,						 
							cols: [[ //表头
						       {field: 'Id', title: 'ID',  sort: true, fixed: 'left'}
						       ,{field: 'title', title: 'title',}
						       ,{field: 'pub_date', title: 'pub_date',  sort: true},
							   {field: 'state', title: 'state', sort: true},
							   {field: 'cate_name', title: 'cate_name',  sort: true}
						     ]]
						   });
	  })
  
});
</script>

</body>
</html>